-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use pyproject.toml as the configuration file #70
Conversation
This is breaking backwards compatibility since it ditches `tbump.toml` and it replaces it with `pyproject.toml` Addresses your-tools#69
# In order to minimize the number of changes that are needed for this switch | ||
# we parse `pyproject.toml` and use it to create a new `tomlkit.Document()` with | ||
# a flat structure | ||
parsed_pyproject = tomlkit.loads(cfg_path.text())["tool"]["tbump"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's pretty clever but it will crash with KeyError if [tool]
or [[tool.tbump]]
section is messing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but let's not forget that the PR was about implementing Option 2, i.e. only support pyproject.toml
. In this case, tool.tbump
should always be present :)))
That being said, handling the KeyError
would probably make sense anyway, since the user might make a typo or something.
Also, per my comments in #69 , I think you should keep tests running with |
I've created a separated PR so we can merge the unrelated fixes (thanks for those, by the way :P) |
Making the pull request so that the test can run in CI
Addresses #69